test(updater): Accept either main or master as sentry-cli main branch#167
Merged
test(updater): Accept either main or master as sentry-cli main branch#167
Conversation
The `writes output` / `writes to env:GITHUB_OUTPUT` tests assert against the live state of getsentry/sentry-cli via `git ls-remote`. Whether the script reports `main` or `master` depends on which of the two currently points at the upstream HEAD, which flips over time. PR #165 baked `main` into the assertion while both happened to point at HEAD; sentry-cli has since diverged and post-merge CI on main now reports `master`, failing the test. Accept either branch name so the test isn't coupled to transient upstream branch state.
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Updater @ {ubuntu,macos,windows}jobs in Script Tests have been failing onmainsince #165 was merged (failing run):Why it didn't fail on the PR
The test asserts against the live state of
getsentry/sentry-cliviagit ls-remote. At PR time (2026-05-07), bothmainandmasterofsentry-clipointed at the same HEAD commit, so the SHA filter matched both refs and the newSelect-Object -First 1returnedmain(alphabetically first). At post-merge time (2026-05-11),sentry-cli'smainandmasterno longer share a SHA — onlymastermatches HEAD — so the script now emitsmainBranch=master.Fix
Accept either
mainBranch=mainormainBranch=masterrather than baking transient upstream branch state into the assertion.Test plan
Invoke-Pesteronupdate-dependency.Tests.ps1)